package com.itheima.health.dao;

import com.itheima.health.pojo.entity.Member;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;

@Mapper
public interface MemberDao {
    
    @Select("select * from t_member where phoneNumber=#{telephone}")
    Member getByPhoneNumber(String telephone);

    void create(Member member);

    /**
     * 统计注册时间早于或等于date的会员数
     * @param date
     * @return
     */
    Integer countBeforeRegTime(LocalDate date);

    Member findByTelephone(String telephone);

    void add(Member member);
}
